#include "stdafx.h"
#include "ReplayController.h"

ReplayController::ReplayController () {}
ReplayController::ReplayController (Model *model) {
	setModel(model);
	reader = new DataPacker("replay.bin");
}

ReplayController::~ReplayController () {
	
}

bool ReplayController::update(float deltaTime) {
	reader->getCommands(&m_commands);
	
	std::list<Command*>::iterator it;
	for ( it=m_commands.begin() ; it != m_commands.end() ; it++ ) {
		(*it)->execute(m_currentModel);
	}
	
	m_commands.clear();

  return true;
}